#pragma once
#include <WinSock2.h>
#include "Core.h"
#include "Complete.h"


struct olap:public OVERLAPPED
{
	uint32 byteToTransfer;
	uint32 byteBeTransfered;
	void*  poster;
	void*  attached;
	Complete<olap*,void*> OnComplete;
	BOOL   success;

	void reset(HANDLE h)
	{
		Internal = 0;
		InternalHigh = 0;
		Offset = 0;
		OffsetHigh = 0;
		hEvent = h;
	}
};